package com.taiji.webfluxcurd.controller;

import com.taiji.webfluxcurd.domain.Prize;
import com.taiji.webfluxcurd.service.IPrizeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import reactor.core.publisher.Mono;

@RestController
public class PrizeController {
    @Autowired
    private IPrizeService iPrizeService;

    @RequestMapping("/test")
    public Mono<Prize> test() {
        Prize prize = new Prize();
        Mono<Prize> add = iPrizeService.add(prize);
        return add;
    }
}
